﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using sexhealth.console.service.post.vo;
using System.Collections.Generic;
using sexhealth.console.service.post;

public partial class test : System.Web.UI.Page
{
    PostService pService = new PostService();
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void Button2_Click(object sender, EventArgs e)
    {
        //Select
        PostVO pst = pService.DaoGetVOById<PostVO>(1);
        TextBox2.Text = pst.Title;

    }
    protected void Button3_Click(object sender, EventArgs e)
    {
        // Update
        PostVO pst = pService.DaoGetVOById<PostVO>(1);
        pst.Title = TextBox2.Text.Trim();
        pService.DaoUpdate(pst);
    }
}
